<!DOCTYPE html> 
<html>
    <head>
        <title>Cadastro de Contas</title>
    </head>    
    <body>
        <?php          
          session_start();
          require ('./banco.php');
          $mysql = new Banco;
          $rs = $mysql->sql_query("SELECT * FROM contas WHERE cd_conta =".$_SESSION['cd_conta']);
          echo 
          "<table>".
                "<th><h1>Cadastrar nova conta </h1>      </th>". 
                  "<tr>".
                        "<td>".
                            "<form action = 'dml.php' method='GET'>".
                                "<input type='hidden'   name = 'table' value='contas'/>".
                                "<input type = 'text' name='nm_contas'>".
                                "<input type = 'submit' name = 'cmd'   value='Cadastrar'/>".
                            "</form>".
                        "</td>".
                  "<tr>".
          "</table>";                  
          echo  "<h1><table><th> Conta </th></h1>";
          while($row = mysqli_fetch_array($rs)){            
            $cd_conta = $row["cd_conta"];
            $nm_contas = $row["nm_contas"];
            echo             
            "<tr>"            
                ."<form action = 'dml.php' method='GET'>".
                "<input type='hidden'   name = 'table' value='contas'/>".
                "<input type='hidden'   name = 'cd_conta' value='$cd_conta'/>".                    
            "<td>".
                 "<input type='text'   name = 'nm_contas' value='$nm_contas'/>".
                 "<input type='submit' name = 'cmd'   value='Alterar'/>".
            "</td>"."<td>".
                 "<input type='submit' name = 'cmd'   value='Excluir'/>".					
            "</form>"
         . "</tr><br>";
          }
          echo "</table>";        
        ?>
    </body>
</html>